#include <glib.h>

static void g_regex_split_simple_test(void)
{
    int i = 0;
    gchar **resv = NULL;
    const gchar *pat = ",\\s*";
    const gchar *str = "abc, ad,,   d1, bee   , a,dfd, pp";

    resv = g_regex_split_simple(pat, str, 0, 0);

    g_print("pattern: %s\n", pat);
    g_print("ori: %s\n", str);

    while(NULL != resv[i]) {
        g_print("[%d]%s \n", i, resv[i++]);
    }

    g_strfreev(resv);
}

int main (int argc, char** argv)
{
    g_regex_split_simple_test();

    return 0;
}
